/*
 * Copyright (c) 2009 Project E7
 *
 * This file is part of ZebBowling
 *
 * ZebBowling is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ZebBowling is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ZebBowling. If not, see <http://www.gnu.org/licenses/>.
 **/

package org.zebbowling.world;

import java.awt.Color;
import java.awt.Graphics;

/**
 *
 * @author Mark
 */
public class BowlingBall extends CanvasObject {
    private boolean roll;


    public void draw(Graphics drawPad)
        {
        Color temp = drawPad.getColor();
        drawPad.setColor(getColor());
        drawPad.fillOval(getXPos(), getYPos(),getWidth(), getHeight());
        drawPad.setColor(temp);
        }

    public boolean roll()
        {
        return roll;
        }
    
    public void setYPos(int yPos) {
        super.setYPos(yPos);
        //sets roll to true after the ball has gone past the top boundary
        if (yPos <= 0)
            roll = true;
    }
    }
